/**
 * ======================================
 * 回车查询
 * author: sky-admin
 * file: keyBoard.js
 * date: 2022/3/28 15:09
 * ======================================
 */
export default {
  mounted() {
    console.log('监听键盘')
    const _this = this
    window.onkeydown = (event) => {
      console.log('按下', event.key)
      if (event.key === 'Enter') {
        _this._search()
      }
    }
  },
  destroy() {
    window.onkeydown = null
  }
}
